bitkeeper revision 1.1389.5.22 (427b29c5KNOxlBYIMC4Z37mPKVY6HA)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 6 May 2005 08:24:37 +0000 (08:24 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 6 May 2005 08:24:37 +0000 (08:24 +0000)
More acpi cleanups. Fix 'acpi=ht'.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c

index a14d2e88d1c35fc60d262d47527b5f8278898f0a..9254f472f2aa801c9a92c03a04c113f24505d3e5 100644 (file)
@@ -7,3 +7,7 @@ c-link                                  :=
 $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)):
        @ln -fsn $(srctree)/arch/i386/kernel/acpi/$(notdir $@) $@
 
+obj-y  += $(c-obj-y) $(s-obj-y)
+
+clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
+clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link))
index d169b3c6848e81b6fd502f0081d41979e9a94b19..2c7211bb4f07ecbfc31a9e89b386306a2b67babb 100644 (file)
@@ -672,10 +672,6 @@ acpi_parse_madt_lapic_entries(void)
 {
        int count;
 
-#ifdef CONFIG_XEN
-       return 0;
-#endif
-
        /* 
         * Note that the LAPIC address is obtained from the MADT (32-bit value)
         * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
@@ -871,9 +867,7 @@ acpi_boot_table_init(void)
        }
 
 #ifdef __i386__
-#ifndef CONFIG_XEN
        check_acpi_pci();
-#endif
 #endif
 
        acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
index 8f701413a51db4a32313ede1060580eab5705d8c..16f2ee8c806066758f95bc4ff1373b5bab1cab3a 100644 (file)
@@ -109,7 +109,7 @@ static int MP_valid_apicid(int apicid, int version)
 {
        return hweight_long(apicid & 0xf) == 1 && (apicid >> 4) != 0xf;
 }
-#else
+#elif !defined(CONFIG_XEN)
 static int MP_valid_apicid(int apicid, int version)
 {
        if (version >= 0x14)
@@ -119,6 +119,7 @@ static int MP_valid_apicid(int apicid, int version)
 }
 #endif
 
+#ifndef CONFIG_XEN
 void __init MP_processor_info (struct mpc_config_processor *m)
 {
        int ver, apicid;
@@ -217,6 +218,12 @@ void __init MP_processor_info (struct mpc_config_processor *m)
        apic_version[m->mpc_apicid] = ver;
        bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
 }
+#else
+void __init MP_processor_info (struct mpc_config_processor *m)
+{
+       num_processors++;
+}
+#endif /* CONFIG_XEN */
 
 static void __init MP_bus_info (struct mpc_config_bus *m)
 {
@@ -816,12 +823,14 @@ void __init find_smp_config (void)
 void __init mp_register_lapic_address (
        u64                     address)
 {
+#ifndef CONFIG_XEN
        mp_lapic_addr = (unsigned long) address;
 
        if (boot_cpu_physical_apicid == -1U)
                boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID));
 
        Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
+#endif
 }
 
 
@@ -841,6 +850,7 @@ void __init mp_register_lapic (
        if (id == boot_cpu_physical_apicid)
                boot_cpu = 1;
 
+#ifndef CONFIG_XEN
        processor.mpc_type = MP_PROCESSOR;
        processor.mpc_apicid = id;
        processor.mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR));
@@ -851,6 +861,7 @@ void __init mp_register_lapic (
        processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
        processor.mpc_reserved[0] = 0;
        processor.mpc_reserved[1] = 0;
+#endif
 
        MP_processor_info(&processor);
 }
index d4c55970012d5aa2789b3e2dcb68ca6e0bcca074..72b9206b75b51b58db5ef409d2d43457d2b204c0 100644 (file)
@@ -1567,6 +1567,10 @@ void __init setup_arch(char **cmdline_p)
        if (efi_enabled)
                efi_map_memmap();
 
+       op.cmd             = PHYSDEVOP_SET_IOPL;
+       op.u.set_iopl.iopl = current->thread.io_pl = 1;
+       HYPERVISOR_physdev_op(&op);
+
        /*
         * Parse the ACPI tables for possible boot-time SMP configuration.
         */
@@ -1584,10 +1588,6 @@ void __init setup_arch(char **cmdline_p)
 
        register_memory();
 
-       op.cmd             = PHYSDEVOP_SET_IOPL;
-       op.u.set_iopl.iopl = current->thread.io_pl = 1;
-       HYPERVISOR_physdev_op(&op);
-
        if (xen_start_info.flags & SIF_INITDOMAIN) {
                if (!(xen_start_info.flags & SIF_PRIVILEGED))
                        panic("Xen granted us console access "